#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int n, m;
	while (cin >> n >> m) {
		int t = 0;
		int index = 0;
		int y = 0;
		for (int i = 0; i < n * m; i++) {
			int x;
			cin >> x;
			if (abs(t) < abs(x)) {
				t = x;
				index = i;
				y = x;
			}
		}
		cout << index / m + 1 << " " << index % m + 1 << " " << y << endl;
	}
	return 0;
}